From: Jo-Philipp Wich Date: Wed, 16 Oct 2019 07:30:54 +0000 (+0200) Subject: luci-proto-openconnect: make PEM values optional X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=7a010b11781222622673c948a06acf0929b98d0a;p=project%2Fluci.git luci-proto-openconnect: make PEM values optional Fixes: #3191 Signed-off-by: Jo-Philipp Wich --- diff --git a/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js b/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js index 14fc8f6d35..0490ceb5ea 100644 --- a/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js +++ b/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js @@ -43,6 +43,9 @@ function validateCert(priv, section_id, value) { start = false, i; + if (value === null || value === '') + return true; + for (i = 0; i < lines.length; i++) { if (lines[i].match(beg)) start = true;